﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Project.BIZ;
using Project.IBIZ;

namespace Project.UI
{
    public partial class ProductDetail : System.Web.UI.Page
    {
        private IProductDetailBIZ ProductDetailBiz = new ProductDetailBIZ();

        protected void Page_Load(object sender, EventArgs e)
        {
            // Take category ID from address bar
            int productId = 0;
            int.TryParse(Request.QueryString[Constants.ProIDFromAddressBar], out productId);

            try
            {
                // Load data to grid view
                DataList1.DataSource = ProductDetailBiz.LoadProductDetail(productId);
                DataList1.DataBind();
            }
            catch (Exception) { }
        }
    }
}